<template>
  <el-form ref="clueDetailRefForm" :model="clueRemark" label-width="auto" style="max-width: 1200px">
    <el-form-item label="负责人">
      <div class="detail">&nbsp;{{clueDetail.ownerDO.name}}</div>
    </el-form-item>

    <el-form-item label="所属活动">
      <div class="detail">&nbsp;{{clueDetail.activityDO.name}}</div>
    </el-form-item>

    <el-form-item label="姓名">
      <div class="detail">&nbsp;{{clueDetail.fullName}}</div>
    </el-form-item>

    <el-form-item label="称呼">
      <div class="detail">&nbsp;{{clueDetail.appellationDO.typeValue}}</div>
    </el-form-item>

    <el-form-item label="手机号">
      <div class="detail">&nbsp;{{clueDetail.phone}}</div>
    </el-form-item>

    <el-form-item label="微信">
      <div class="detail">&nbsp;{{clueDetail.weixin}}</div>
    </el-form-item>

    <el-form-item label="QQ">
      <div class="detail">&nbsp;{{clueDetail.qq}}</div>
    </el-form-item>

    <el-form-item label="邮箱">
      <div class="detail">&nbsp;{{clueDetail.email}}</div>
    </el-form-item>

    <el-form-item label="年龄">
      <div class="detail">&nbsp;{{clueDetail.age}}</div>
    </el-form-item>

    <el-form-item label="职业">
      <div class="detail">&nbsp;{{clueDetail.job}}</div>
    </el-form-item>

    <el-form-item label="住址">
      <div class="detail">&nbsp;{{clueDetail.address}}</div>
    </el-form-item>

    <el-form-item label="年收入">
      <div class="detail">&nbsp;{{clueDetail.yearIncome}}</div>
    </el-form-item>

    <el-form-item label="是否需要贷款">
      <div class="detail">&nbsp;{{clueDetail.needLoanDO.typeValue}}</div>
    </el-form-item>

    <el-form-item label="意向状态">
      <div class="detail">&nbsp;{{clueDetail.intentionStateDO.typeValue}}</div>
    </el-form-item>

    <el-form-item label="意向产品">
      <div class="detail">&nbsp;{{clueDetail.intentionProductDO.name}}</div>
    </el-form-item>

    <el-form-item label="线索状态">
      <div class="detail">&nbsp;{{clueDetail.stateDO.typeValue}}</div>
    </el-form-item>

    <el-form-item label="线索来源">
      <div class="detail">&nbsp;{{clueDetail.sourceDO.typeValue}}</div>
    </el-form-item>

    <el-form-item label="线索描述">
      <div class="detail">&nbsp;{{clueDetail.description}}</div>
    </el-form-item>

    <el-form-item label="下次联系时间">
      <div class="detail">&nbsp;{{clueDetail.nextContactTime}}</div>
    </el-form-item>
  </el-form>
</template>

<script>
import {doGet} from "../http/httpRequest.js";
import {back} from "../utils/util.js";

export default {
  name: "ClueDetailView",
  data(){
    return {
      clueDetail: {
        ownerDO: {},   // 负责人
        activityDO: {},  // 活动
        appellationDO: {},  // 称呼
        needLoanDO: {},  // 是否需要贷款
        intentionStateDO: {}, // 意向状态
        intentionProductDO: {},  // 意向产品
        stateDO: {},  // 状态
        sourceDO: {}  // 来源
      },
      clueRemark: {},
    }
  },

  mounted() {
    this.loadClueDetail();
  },

  methods:{
    back,
    // 获取线索详情
    loadClueDetail(){
      let id = this.$route.params.id;
      doGet('/api/clue/detail/'+id,{}).then(resp=>{
        if (resp.data.code===200){
          this.clueDetail=resp.data.data
        }
      })
    }
  }
}

</script>

<style scoped>
.detail {
  background-color: #F0FFFF;
  width: 80%;
  padding-left: 5px;
}
.el-form-item {
  height: 30px;
}
</style>